<?php
// $Id: listing_location_handler_field_city_link.inc,v 1.2 2011/01/16 07:01:22 newzeal Exp $

/**
 * Field handler for terms.
 */
class autheal_handler_field_city_link extends views_handler_field {

  function render($values) {
    if (!function_exists('location_province_list_us')) include(drupal_get_path('module','location').'/supported/location.us.inc');
    $states = location_province_list_us();
    $state_name = strtolower(str_replace(" ","-", $states[$values->{location_province}]));
    return l($values->{$this->field_alias}, 'therapist/'.$values->{location_country}.'/'.$state_name.'/'.strtolower(str_replace(" ","-",$values->{$this->field_alias})).'/'.strtolower($values->{location_province}).'/all/25');
  
  }
}